#ifndef __COMPATIBILITY_HPP
#define __COMPATIBILITY_HPP

#include "ui/zui.h"
#include <sys/ioctl.h> 

//-------mirrors--------
#ifdef __ANDROID__
	
#	define C_NUMCTROLKEY_UP '2'
#	define C_NUMCTROLKEY_DOWN '8'
#	define C_NUMCTROLKEY_UPLEFT '1'
#	define C_NUMCTROLKEY_UPRIGHT '3'
#	define C_NUMCTROLKEY_DOWNLEFT '7'
#	define C_NUMCTROLKEY_DOWNRIGHT '9'

const unsigned DEFAULTSCREENSIZE_X = 67;
const unsigned DEFAULTSCREENSIZE_Y = 27;
	
const unsigned EDITBOXSIZE_X = DEFAULTSCREENSIZE_X - 8;
const unsigned EDITBOXSIZE_Y = DEFAULTSCREENSIZE_Y - 3;

#	define USERHOMEPATH "/sdcard/"
	
#else
	
#	define C_NUMCTROLKEY_UP '8'
#	define C_NUMCTROLKEY_DOWN '2'
#	define C_NUMCTROLKEY_UPLEFT '7'
#	define C_NUMCTROLKEY_UPRIGHT '9'
#	define C_NUMCTROLKEY_DOWNLEFT '1'
#	define C_NUMCTROLKEY_DOWNRIGHT '3'

const unsigned DEFAULTSCREENSIZE_X = 128;
const unsigned DEFAULTSCREENSIZE_Y = 36;
	
const unsigned EDITBOXSIZE_X = DEFAULTSCREENSIZE_X - 8;
const unsigned EDITBOXSIZE_Y = DEFAULTSCREENSIZE_Y - 3;
	
#	define USERHOMEPATH "./"

#endif
//----------------------


//--------common--------
#define C_NUMCTROLKEY_LEFT '4'
#define C_NUMCTROLKEY_RIGHT '6'

#define C_NUMCTROLKEY_GETINTO C_NUMCTROL_RIGHT
#define C_NUMCTROLKEY_CONFIRM '5'

#define C_CONTROLKEY_ESC ((char)27)

#endif
